﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Workflow.Alerts.Sublayouts
{
    public partial class Map : BasePage, IMapOneView
    {
        string googleXml;
        protected void Page_Load(object sender, EventArgs e)
        {
            Response.ContentType = "text/xml";
            PresentationManager.RegisterView(typeof(MapPresenter), this, new WebSessionProvider());

            if (OnMapLoad != null)
            {
                OnMapLoad();
            }
        }

        protected override void Render(HtmlTextWriter writer)
        {
            writer.Write(googleXml);
        }

        #region IMapOneView Members

        public string Markers
        {
            set { googleXml = value; }
        }

        public string Alertid
        {
            get { return Request.QueryString["id"]; }
        }

        public event OnMapOneViewLoad OnMapLoad;

        #endregion      
    }
}
